import numpy as np

us_file_path = './youtube_video_data/US_video_data_numbers.csv'
uk_file_path = './youtube_video_data/GB_video_data_numbers.csv'

us_file = np.loadtxt(us_file_path,delimiter=',',dtype='int')
print(us_file)
print('*'*100)
# 取第一行
# print(us_file[0])
# 取连续的多行
# print(us_file[2:])

#取不连续的多行
# print(us_file[[0,1,2]])
#跟上面结果一样
# print(us_file[[0,1,2],:])

# 取列
# print(us_file[:,0])

# 取连续的多列
# print(us_file[:,2:])

# 取不连续的多列
# print(us_file[:,[0,1,2]])

# 取行和列
a = us_file[2,3] # 为一个值
print(a)

# 取多行和多列
b = us_file[0:2,0:4]  #为交叉点的位置
print(b)

#取多个不相邻的点
c = us_file[[0,1,2],[0,1,2]] # 总共3个点,分别为(0,0)(1,1)(2,2)
print(c)



